﻿@using Orchard.ContentManagement;
@using Orchard.UI.Resources;
@using PJS.Bootstrap.Models;

@{
    var theme = WorkContext.CurrentTheme;
    var settings = WorkContext.CurrentSite.As<ThemeSettingsPart>();

    RegisterLink(new LinkEntry { Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content(theme.Location + "/" + theme.Path + "/Content/" + "favicon.ico") });
    RegisterLink(new LinkEntry { Rel = "apple-touch-icon", Href = Url.Content(theme.Location + "/" + theme.Path + "/Content/" + "apple-touch-icon.png") });

    SetMeta(new MetaEntry { Name = "viewport", Content = "width=device-width, initial-scale=1.0" });
    SetMeta(httpEquiv: "X-UA-Compatible", content: "IE=edge,chrome=1");

    Style.Include("site-" + settings.Swatch + ".min.css");

    Script.Include("~/Core/Shapes/Scripts/html5.js").UseCondition("lt IE 9").AtHead();
    Script.Require("Bootstrap");
    
    if(settings.UseHoverMenus) {
        Script.Require("HoverDropdown");
    }

    Script.Require("Theme-ValidationEngine-en");
    Script.Require("Theme-ValidationEngine");
    Script.Require("Custom");
    Script.Require("jQuery-Validate");
    Script.Require("jQuery-Validate-Addons");

    Script.Require("jQuery2.1").AtHead();
    Script.Require("Bootstrap").AtHead();
    Script.Require("Modernizr").AtHead();
}